﻿<Window x:Class="Module.Splash.View.SplashView" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Behaviour="clr-namespace:Module.Splash.Behaviour"
        Behaviour:SplashBehaviour.Enabled="True" mc:Ignorable="d" 
        UseLayoutRounding="True" Style="{DynamicResource SplashWindowStyle}" Height="300" Width="500">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Module.Splash;component/Resource/SplashResource.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="130" />
            <RowDefinition Height="30" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Source="{StaticResource SplashBackGround}" Stretch="Fill" Grid.Row="0" Grid.RowSpan="3" />
        <TextBlock Text="WPF Prism Starter Kit" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Calibri" FontSize="24" FontWeight="Bold"></TextBlock>
        
        <ProgressBar Margin="10,5,10,5" IsIndeterminate="True" Opacity="0.5" Grid.Row="1" />

        <DockPanel Grid.Row="2">

            <ScrollViewer x:Name="LogScroller" Margin="10,10,10,0" ScrollChanged="LogScroller_ScrollChanged" VerticalScrollBarVisibility="Hidden" DockPanel.Dock="Right">
                <TextBlock Style="{StaticResource SplashText}" Margin="0,0,0,0" MinWidth="370" Width="{Binding ElementName=LogScroller, Path=ViewportWidth}" Text="{Binding Status}" TextAlignment="Left" TextWrapping="Wrap" />
            </ScrollViewer>

            <Image VerticalAlignment="Top" HorizontalAlignment="Left" Width="80" Source="{StaticResource SplashLogo}" Margin="10,10,0,0" Stretch="Uniform" Opacity="0.5" DockPanel.Dock="Left" />

        </DockPanel>

    </Grid>

</Window>